
#Constantes
MODEL = 'model' # Pasta com os scripts e modelos
CLEAN_FILE = 'clean_trash.sh'
GERA_CODIGO_FILE = 'generate_source.sh'
CONF_FILE = 'generate.conf'

# Templates para os scripts
CLEAN_TEMPLATE = """
echo "==>> Limpando produto..."
find ./${produto_nome}/ -name "*.pyc" -exec rm {} \;
find ./${produto_nome}/ -name "*.pyo" -exec rm {} \;
find ./${produto_nome}/ -name "*~" -exec rm {} \;
find ./${produto_nome}/ -name "*.zuml.bak.*" -exec rm {} \;
"""
GERA_CODIGO_TEMPLATE = """
${produto_nome}/model/clean_trash.sh
python ArchGenXML/ArchGenXML.py -c ${produto_nome}/model/generate.conf ${produto_nome}/model/${produto_nome}.zuml
"""
CONF_TENMPLATE = """
[DOCUMENTATION]

## Strip HTML tags from documentation strings, handy for UML editors,
## such as Poseidon, which store HTML inside docs (default is 0).
strip-html: yes

## Generate module information header
module-info-header: yes

## Set default author value (can specify as comma-separated list, or
## specify several times).
author: Joao Antonio

## Set default email (can specify as comma-separated list, or specify
## several times).
e-mail: joaojoao@gmail.com

## Set default copyright
copyright: CTEC


[STORAGE]

## Generate configuration and generators for APE (default is 0).
#ape-support: no


[GENERAL]

## Output directory in which to put everything
outfile: ${produto_nome}

## Name of packages to generate (can specify as comma-separated list, or
## specify several times)
#generate-packages: 

## Names of packages to scan for classes (can specify as comma-separated
## list, or specify several times). FIXME: Leaving this empty probably
## means that all packages are scanned.
#parse-packages: 

## Overwrite existing files? (Default is 1).
#force: yes

## Generate a customization policy (default is 0).
customization-policy: 1

## Add RCS $$Id$$ tags to the generated file (default is 0).
#rcs_id: no

## Add generation date to generated files (default is 0).
#generated_date: no

## Adds PREFIX before each class name (default is '').
#prefix: 


[CLASSES]

## Treat unknown attribute types as strings (default is 0).
#unknown-types-as-string: no

## Create widgets with default label, label_msgid, description,
## description_msgid, and i18ndomain (default is 1).
#widget-enhancement: yes

## Generate actions (default is 1)
#generate-actions: yes

## Generate default actions explicitly for each class (default is 0).
#default-actions: no

## Preserve methods in existing source files (default is 1).
#method-preservation: yes

## For references, create a back reference field on the referred-to
## class. Requires ATBackRef product to work. (Default is 0).
#backreferences-support: yes

## Always generate 'id' and 'title' fields (default is 0).
#default-field-generation: no

## Don't generate classes, so create an empty project with skin dir and
## so (default is 0).
#no-classes: no

## Specifies default permission to create content (defaults to 'Add
## portal content.'). Warning: it used to be 'Add [CREATION_PERMISSION]
## content', so with the 'Add' and 'content' automatically added.
#default-creation-permission: Add portal content

## Separate creation permissions per class (defaults to no)
detailed-created-permissions: yes

## FIXME: not sure it this is used. (default is 0)
sql-storage-support: yes

## specifies how relations should be implemented(default is 'basic').
#relation-implementation: basic


[I18N]

## Automatically build msgid catalogs (default is 1).
#message-catalog: yes

## Support for i18NArchetypes. Attributes with a stereotype of 'i18n' or
## taggedValue of i18n=1 will be multilingual (default is 0).
#i18n-content-support: no
"""

SCRIPTS = [
    (CLEAN_FILE, CLEAN_TEMPLATE, 0744 ),
    (GERA_CODIGO_FILE, GERA_CODIGO_TEMPLATE, 0744),
    (CONF_FILE, CONF_TENMPLATE, 0644),
    ]
